#include "StdAfx.h"
#include "TestActiveObject.h"
//#include "TestPayload.h"
#include "TypeIds.h"

namespace CO { namespace SpiFoundation { namespace RoomFW {

TestActiveObject::TestActiveObject(const char* name) :
	//
	// Initialize Base class.
	//
	ActiveObject(PORT_COUNT,
		SpiFoundation::RoomFW::ActiveObject::PortPriorityArray(&PortPriorities[0], &PortPriorities[PortPrioritiesSize])),
	//
	// TODO:  Initialize attributes.
	//
	myConfigValue_(0),	// TODO:  Initialize attributes to default!
	name_(name)
{
}

TestActiveObject::~TestActiveObject(void)
{
}

bool TestActiveObject::initialize(SpiFoundation::Configuration::ConfigKey& configRoot)
{
	//
	// TODO:  Initialize attributes with configuration settings.  Get key and value
	//		  will create if they don't exist, so be sure everyone uses the same defines
	//		  to avoid spelling errors!
	//
	//SpiFoundation::Configuration::ConfigKey* myKey = configRoot.getKey(MY_CONFIG_KEY);
	//ASSERT(0 != myKey);
	//myConfigValue_ = myKey->getValue(MY_INT_VALUE, 42L);
	return true;
}

SpiFoundation::RoomFW::PortIndex::PrimaryIndex TestActiveObject::getSystemPort(void) const
{
	return PORT_SYSTEM;
}

SpiFoundation::RoomFW::ObjectId TestActiveObject::getObjectId(void) const
{
	//
	// TODO:  Return a unique id for your object.
	//
	return OID_NULL;
}

const char* TestActiveObject::getObjectName(void) const
{
	//
	// TODO:  Add text for your object name for debugging.
	//
	return name_.c_str();
}

void TestActiveObject::handle(SpiFoundation::RoomFW::RoomMessageSP message)
{
}

}}} // End namespace
